home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / libgimp / stdplugins-intl.h < prev   
Encoding:
C/C++ Source or Header  |  2002-11-09  |  1.8 KB  |  60 lines

  1. /* LIBGIMP - The GIMP Library 
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball 
  3.  *
  4.  * stdplugins-intl.h
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  * 
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #ifndef __STDPLUGINS_INTL_H__
  23. #define __STDPLUGINS_INTL_H__
  24.  
  25. #include "gimpintl.h"
  26.  
  27. #if defined (HAVE_BIND_TEXTDOMAIN_CODESET) && defined (GDK_WINDOWING_WIN32)
  28. #define BTDCS(d) bind_textdomain_codeset (d, "UTF-8")
  29. #else
  30. #define BTDCS(d)
  31. #endif
  32.  
  33. #ifdef HAVE_LC_MESSAGES
  34. #define INIT_I18N()    G_STMT_START{            \
  35.   setlocale(LC_MESSAGES, "");                 \
  36.   bindtextdomain("gimp-libgimp", LOCALEDIR);            \
  37.   BTDCS("gimp-libgimp");                \
  38.   bindtextdomain("gimp-std-plugins", LOCALEDIR);    \
  39.   BTDCS("gimp-std-plugins");                \
  40.   textdomain("gimp-std-plugins");            \
  41.               }G_STMT_END
  42. #else
  43. #define INIT_I18N()    G_STMT_START{            \
  44.   bindtextdomain("gimp-libgimp", LOCALEDIR);            \
  45.   BTDCS("gimp-libgimp");                \
  46.   bindtextdomain("gimp-std-plugins", LOCALEDIR);    \
  47.   BTDCS("gimp-std-plugins");                \
  48.   textdomain("gimp-std-plugins");            \
  49.               }G_STMT_END
  50. #endif
  51.  
  52. #define INIT_I18N_UI()    G_STMT_START{    \
  53.   gtk_set_locale();            \
  54.   setlocale (LC_NUMERIC, "C");        \
  55.   INIT_I18N();                \
  56.             }G_STMT_END
  57.  
  58.  
  59. #endif /* __STDPLUGINS_INTL_H__ */
  60.